<h1>Listing books</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Description</th>
    <th>Authour</th>
    <th>Price</th>
    <th>Isbn</th>
    <th>Publisher</th>
    <th>Publish date</th>
    <th>Category</th>
    <th>Tag</th>
    <th>Image</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @books.each do |book| %>
  <tr>
    <td><%= book.name %></td>
    <td><%= book.description %></td>
    <td><%= book.authour %></td>
    <td><%= book.price %></td>
    <td><%= book.isbn %></td>
    <td><%= book.publisher %></td>
    <td><%= book.publish_date %></td>
    <td><%= book.category_id %></td>
    <td><%= book.tag %></td>
    <td><%= book.image %></td>
    <td><%= link_to 'Show', book %></td>
    <td><%= link_to 'Edit', edit_book_path(book) %></td>
    <td><%= link_to 'Destroy', book, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Book', new_book_path %>
